package com.cimc.service.ws;

import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;



@Path(value = "/sample")
public class TestImpl implements Test {

	private static final Logger logger = LoggerFactory.getLogger(TestImpl.class);
	
	@GET
	@Path("/query/{param}")
	@Produces(MediaType.APPLICATION_JSON)
	public String testQuery(@PathParam("param") String employeeCode) {
		logger.debug(employeeCode+"==============");
		return employeeCode;
	}

	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public String test() {
		logger.debug("=======");
		return "this is test ....";
	}

	@POST
	@Path("/postData")
    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
	public String testManyParam(String name) {
		logger.debug(name+"============");
		return "test many param...";
	}

}
